package com.cc.controller;

import com.cc.entity.employee;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
@ResponseBody
@RequestMapping("/emp")
public class UserController {
    @RequestMapping("list")
    public String emp() {
        return "员工列表";
    }
    @RequestMapping("getEmp")
    public employee getEmp() {
        employee emp = new employee();
        emp.setId(1);
        emp.setName("张三");
        emp.setSex("男");
        emp.setAge(18);
        emp.setPhone("12345678901");
        emp.setEmail("<EMAIL>");
        emp.setAddress("上海");
        return emp;
    }
}
